<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>
<body>
    <div id="app">
        <div >
            <span @click="item=1">电影</span>
            <span @click="item=2">音乐</span>
            <span @click="item=3">娱乐</span>
            <span @click="item=4">游戏</span>
        </div>

        <!-- v-show根据判断的boolean值，来让元素是display block还是none -->
        <ul v-show="item===1">
            <li >111111111</li>
            <li>111111111</li>
            <li>111111111</li>
            <li>111111111</li>
        </ul>
        <ul v-show="item===2">
            <li>222222222</li>
            <li>222222222</li>
            <li>222222222</li>
            <li>222222222</li>
        </ul>
        <ul v-show="item===3">
            <li>333333333</li>
            <li>333333333</li>
            <li>333333333</li>
            <li>333333333</li>
        </ul>
        <ul v-show="item===4">
            <li>444444444</li>
            <li>444444444</li>
            <li>444444444</li>
            <li>444444444</li>
        </ul>
    </div>

    <script>
        Vue.config.productionTip = false;
        const vm = new Vue({
            el:'#app',
            data(){
                return{
                    item:1
                }
            }
        })
    </script>
</body>
</html>